<?php
$this->breadcrumbs=array(
	'Nhân vật: ' . $model->nickname,
);

$this->pageTitle = $model->seotool->title;
$this->pageDescription = $model->seotool->description;
$this->pageKeywords = $model->seotool->keywords;
$this->pageCanonical = array('/Events/artists/view', array('slug'=>$model->url));
$this->pageRobotsFollow = 'follow';

$this->pageFacebook=array(
    'og:title'=>$model->seotool->title,
    'og:author'=>SITE_AUTHOR,
    'og:type'=>'article',
    'og:image'=>'artists/' . date('Ymd', strtotime($model->createddate)) . '/' . $model->image,
    'og:url'=>array('/Events/artists/view', array('slug'=>$model->url)),
    'og:description'=>$model->seotool->description,
    'og:locale'=>'vi_VN',
);

?>
<article class="event-detail">
    <h1 class="event-title">Nhân vật sự kiện: <?php echo $model->nickname; ?></h1>
    <div class="row">
    	<div class="col-xs-8">
            <div class="event-primary">
                <!-- Artist content -->
                <div class="event-body">
                	<div class="event-image text-center">
                        <img src="<?php echo IMAGES_URL . 'artists/' , date('Ymd', strtotime($model->createddate)) , '/', $model->imagecover; ?>" alt="<?php echo $model->nickname; ?>" width="100%" />
                    </div>
                    <div class="event-content">
                        <?php echo $model->profile->description; ?>
                    </div>
                </div>
                
                <!-- Event Social -->
                <h3 class="event-share">Chia sẻ và bình luận</h3>
                <div class="event-social">
                	<div class="event-social-item">
                    	<div class="fb-like" data-href="<?php echo Yii::app()->createAbsoluteUrl('/Events/artists/view',array('slug'=>$model->url)); ?>" data-width="450" data-layout="button_count" data-show-faces="true" data-send="false"></div>
                    </div>
                    <div class="event-social-item">
	                    <a href="https://twitter.com/NEXTTOPEVENT" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow</a>
                    </div>
                    <div class="event-social-item">
                    	<g:plusone annotation="bubble" size="medium"></g:plusone>
                    </div>
                    <div class="clear"></div>
                </div>
                <!-- Event Facebook Comment -->
                <div class="fb-comments" data-href="<?php echo Yii::app()->createAbsoluteUrl('/Events/artists/view',array('slug'=>$model->url)); ?>" data-width="683"></div>
            </div>
        </div>
        <div class="col-xs-4">
            <!-- Artist information -->
            <aside class="widget event-tickets">
                <?php /*
                <div class="artist-image">
                    <img src="<?php echo IMAGES_URL . 'artists/' , date('Ymd', strtotime($model->createddate)) , '/', $model->image; ?>" alt="<?php echo $model->nickname; ?>" width="100%" />
                </div>
                 */ ?>
            	<h3>Thông tin nhân vật</h3>
                <div class="ticket-list">
                	<div class="ticket-item row">
                    	<div class="col-xs-6">
                        	<span class="ticket-title">Tên thật:</span>
                        </div>
                        <div class="col-xs-6 text-right">
                        	<span class="ticket-price"><?php echo $model->fullname; ?></span>
                        </div>
                    </div>
                    <div class="ticket-item row">
                    	<div class="col-xs-6">
                        	<span class="ticket-title">Ngày sinh:</span>
                        </div>
                        <div class="col-xs-6 text-right">
                        	<span class="ticket-price"><?php echo date('Y', strtotime($model->dateofbirth)); ?></span>
                        </div>
                    </div>
                </div>
            </aside>
            
            <!-- Events in Artists -->
            <?php if (!empty($eventNews)): ?>
        	<aside class="widget box bg-grey">
                <h3>Sự kiện sắp tham gia</h3>
                <div class="event-small">
                <?php foreach ($eventNews as $data): ?>
                    <div class="event-item media">
                    	<a class="pull-left" href="<?php echo Yii::app()->createurl('/Events/default/view', array('category'=>$data->category->url, 'url'=>$data->url)); ?>" title="<?php echo $data->title; ?>">
                        	<img class="media-object" src="<?php echo IMAGES_URL . 'events/thumbs/' , date('Ymd', strtotime($data->posteddate)), '/', $data->image; ?>" alt="<?php echo $data->title; ?>" width="64" height="40">
                        </a>
                        <div class="media-body">
                        	<h4 class="media-heading"><?php echo CHtml::link($data->title, array('/Events/default/view', 'category'=>$data->category->url, 'url'=>$data->url), array('title'=>$data->title)); ?></h4>
                        </div>
                    </div>
                <?php endforeach; ?>
                	<div class="text-center bg-white box">
                    	<?php echo CHtml::link('XEM TẤT CẢ', array('/Events/artists/eventNews', 'slug'=>$model->url), array('title'=>'Xem các sự kiện khác')); ?>
                    </div>
                </div>
            </aside>
            <?php endif; ?>
            <?php if (!empty($eventOld)): ?>
            <aside class="widget box bg-grey">
                <h3>Sự kiện đã tham gia</h3>
                <div class="event-small">
                <?php foreach ($eventOld as $data): ?>
                    <div class="event-item media">
                    	<a class="pull-left" href="<?php echo Yii::app()->createurl('/Events/default/view', array('category'=>$data->category->url, 'url'=>$data->url)); ?>" title="<?php echo $data->title; ?>">
                        	<img class="media-object" src="<?php echo IMAGES_URL . 'events/thumbs/' , date('Ymd', strtotime($data->posteddate)), '/', $data->image; ?>" alt="<?php echo $data->title; ?>" width="64" height="40">
                        </a>
                        <div class="media-body">
                        	<h4 class="media-heading"><?php echo CHtml::link($data->title, array('/Events/default/view', 'category'=>$data->category->url, 'url'=>$data->url), array('title'=>$data->title)); ?></h4>
                        </div>
                    </div>
                <?php endforeach; ?>
                	<div class="text-center bg-white box">
                    	<?php echo CHtml::link('XEM TẤT CẢ', array('/Events/artists/eventOld', 'slug'=>$model->url), array('title'=>'Xem các sự kiện khác')); ?>
                    </div>
                </div>
            </aside>
            <?php endif; ?>
        </div>
    </div>
</article>